import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: () => import('../views/Login.vue'),
  },
    {
      path: '/wts',
      name: 'wts',
      component: () => import('../views/Wts.vue'),
      // redirect:"/wts/",
    children:[
      {
        path:'refund',
        name:'refund',
        component:()=>import('../views/refund.vue')
      },
       {
        path: 'usertable',
        name: 'usertable',
        component: () => import('../views/Usertable.vue'),
       },
       {
        path: 'spot',
        name: 'spot',
        component: () => import('../views/Spot.vue'),
       },
       {
        path: 'orderform',
        name: 'order',
        component: () => import('../views/Orderform.vue'),
       },
       {
        path: 'carousel',
        name: 'carousel',
        component: () => import('../views/Carousel.vue'),
       },
       {
        path: 'notice',
        name: 'notice',
        props:true,
        component: () => import('../views/Notice.vue'),
       },{
  path: 'data',
  name: 'data',
  component: () => import('../views/Data.vue'),
  meta : {
    requireAuth:true //这个参数 true 代表需要登录才能进入A
}
},
    ]
    },



{
  path: '/',
  name: 'login',
  component: () => import('../views/Login.vue'),
},
   
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
